package com.unknown.network;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class NetworkClient {
    private static NetworkClient networkClient;
    private static Retrofit retrofit;

    private NetworkClient() {
    }

    public static void init(String baseURL) {
        networkClient = new NetworkClient();
        retrofit = new Retrofit.Builder()
                .baseUrl(baseURL)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }

    public static NetworkClient getInstance() {
        return networkClient;
    }

    public static Retrofit getRetrofit() {
        return retrofit;
    }
}
